package com.atguigu.gmall.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class PassportController {

    //http://passport.gmall.com/login.html?originUrl=http://list.gmall.com/list.html?keyword=%E6%89%8B%E6%9C%BA
    @GetMapping("login.html")
    public String login(HttpServletRequest request,String originUrl){
        // 在这个控制器中需要保存originUrl
        request.setAttribute("originUrl",originUrl);
        // 返回视图名称
        return "login";
    }
}
